package com.common.utils;


import javax.servlet.*;
import java.io.IOException;



/**
 *
 * <p>
 * <a href="I18nFilter.java.html"><i>View Source</i></a>
 * </p>
 * @author <a href="mailto:db2admin@leading.com">db2admin</a>
 * @version Revision: 1.0  Date: 2007-7-5 ����06:22:09 
 */
public class I18nFilter implements Filter
{
    private FilterConfig config = null;

    public void init (FilterConfig config) throws ServletException
    {
        this.config = config;
    }

    public void destroy ()
    {
        config = null;
    }

    public void doFilter (ServletRequest request , ServletResponse response ,
                          FilterChain chain) throws IOException , ServletException
    {
        request.setCharacterEncoding("GBK");
        response.setContentType("GBK");
        chain.doFilter(request , response);

    }
}
